<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>管理中心</title>
<link rel="stylesheet" href="<?php echo $this->baseUrl;?>/files/admin/css/main.css" />
<script language="javascript" src="<?php echo $this->baseUrl;?>/files/admin/js/jquery.js"></script>
<script language="javascript" src="<?php echo $this->baseUrl;?>/files/admin/js/load.js"></script>
</head>

<body>
	<div id="main">
		<div id="navigation">当前位置：<a href="<?php echo $this->projectUrl(array('action'=>'index-'.$this->suffix)) ;?>">渠道申请列表</a> &gt; <span id="focus">审核申请</span></div>
  <div id="body">
			<div id="edit">
				<form id="editForm" name="editForm" method="post" action="">
					<table class="table">
						<tr class="dataLine">
						  <td width="28%">产品：</td>
						  <td width="72%"><?php echo $this->row['productName'];?></td>
					  </tr>
						<tr class="dataLine">
						  <td>产品编号：</td>
						  <td>
                       
                          <?php echo $this->row['productCode'];?>                          </td>
					  </tr>
						<tr class="dataLine">
						  <td>操作系统：</td>
						  <td>
                    
                          <?php echo $this->row['osName'];?>                         </td>
					  </tr>
						<tr class="dataLine">
							<td height="19"><p >申请数量：</p>						    </td>
							<td><?php echo $this->row['applyNum'];?></td>
						</tr>
						<tr class="dataLine">
						  <td>申请渠道：</td>
						  <td><?php echo $this->row['memberCode'];?></td>
					  </tr>
						<tr class="dataLine">
							<td>申请渠道经理：</td>
						  <td><?php echo $this->row['applyUserName'];?></td>
						</tr>
						<tr class="dataLine">
						  <td>申请日期：</td>
						  <td><?php echo $this->row['applyTime'];?></td>
					  </tr>
						<tr class="dataLine">
						  <td>申请备注：</td>
						  <td><?php echo $this->row['applyNotes'];?></td>
					  </tr>
						<tr class="dataLine">
						  <td>状态：</td>
						  <td><?php 
							switch ($this->row['status']) {
								case 1: 
								echo "未处理";
								break;
								case 2: 
								echo "已审核未通过";
								break;
								case 3: 
								echo "审核通过待打包";
								break;
								case 4:
								echo "已打包待测试";
								break;
								case 5:
								echo "测试通过";
								break;
								case 6:
								echo "普通审核通过，等待特级审核";
								break;
								}
							?></td>
					  </tr>
						<tr class="dataLine">
						  <td>审核时间：</td>
						  <td><?php echo $this->row['checkTime'];?></td>
					  </tr>
						<tr class="dataLine">
						  <td>打包人员：</td>
						  <td><?php echo $this->row['appUploadUserName'];?></td>
					  </tr>
						<tr class="dataLine">
						  <td>测试人员：</td>
						  <td><?php echo $this->row['appTestUserName'];?></td>
					  </tr>
						<tr class="dataLine">
						  <td>软件包推广ID</td>
						  <td><?php echo $this->sourceId;?></td>
					  </tr>
						<tr class="dataLine">
						  <td>软件包推广子ID</td>
						  <td>
                          <?php foreach($this->sourceSubIds as $sourceSubId):?>
                          <?php echo $sourceSubId;?><br />  
                          <?php endforeach;?>                          </td>
					  </tr>
						<tr class="dataLine">
						  <td height="22">审核状态：</td>
						  <td>&nbsp;&nbsp;
  <input type="radio" name="status" id="radio2" value="2"
  class="radioChangeStatus"
  						 <?php if($this->row['status']=="2"):?>
                            checked="checked"
                          <?php endif;?>
   />
已审核未通过&nbsp;&nbsp;&nbsp;
<input type="radio" name="status" id="radio3" value="6"
class="radioChangeStatus"
                          <?php if($this->row['status']=="6"):?>
                            checked="checked"
                          <?php endif;?> />
已审核待特级审核</td>
					  </tr>
						<tr class="dataLine">
						  <td>审核意见：</td>
						  <td><textarea name="checkNotes" cols="30" rows="5" class="input" id="checkNotes" style="width:300px;"><?php echo $this->row['checkNotes'];?></textarea>
					      <input type="hidden" name="backUrl" id="backUrl" value="<?php echo $this->projectUrl(array('controller'=>'source','action'=>'index-'.$this->suffix));?>" /></td>
					  </tr>
						<tr class="dataLine">
							<td>&nbsp;</td>
							<td><input type="submit" name="button" id="button" value="提交" class="button" /></td>
						</tr>
					</table>
			  </form>
			</div>
		</div>
</div>

<script>
$(function(){
		   	$(".radioChangeStatus").click(function(){
								if($(this).attr("checked")==true && $(this).val()=="3")
								{
									$(".setManager").show();
								}
								else
								{
									$(".setManager").hide();
								}
										
					})
		   })
</script>

<!-- 有角色获取用户名，上传人员 -->
<script>
$(function(){
	$("#role_upload").change(function(){
	var self=$("#appUploadUserName")[0];
		 $.ajax({ url: "<?php echo $this->projectUrl(array('action'=>'get-user-names-by-role-id'));?>",
              type:"post",           
             dataType:"json",
             data: "roleId="+$("#role_upload option:selected").val(),
             success:function(data){ 
			 			
			 						self.options.length=0;
									self.options[0] = new Option('选择', '');
									var default_osName=$("#default_appUploadUserName").val();
                                   $.each(data,function(i){
								   	self.options[i+1] = new Option(data[i], data[i]);
								   		 if(default_osName==data[i]) {										 
										 	self.options[i+1].selected=true;																					
										 } 
											  }); 
								  
                              } 
         });
	
	
	
	})
	
	$("#role_upload").change();
	
})
</script>
<!-- 有角色获取用户名，上传人员 -->


<!-- 有角色获取用户名，测试人员 -->
<script>
$(function(){
	$("#role_test").change(function(){
	var self=$("#appTestUserName")[0];
		 $.ajax({ url: "<?php echo $this->projectUrl(array('action'=>'get-user-names-by-role-id'));?>",
              type:"post",           
             dataType:"json",
             data: "roleId="+$("#role_test option:selected").val(),
             success:function(data){ 
			 			
			 						self.options.length=0;
									self.options[0] = new Option('选择', '');
									var default_osName=$("#default_appTestUserName").val();
                                   $.each(data,function(i){
								   	self.options[i+1] = new Option(data[i], data[i]);
								   		 if(default_osName==data[i]) {										 
										 	self.options[i+1].selected=true;																					
										 } 
											  }); 
								  
                              } 
         });
	
	
	
	})
	
	$("#role_test").change();
	
})
</script>
<!-- 有角色获取用户名，测试人员 -->
</body>
</html>